package com.duolaibei.business.view.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;

import com.duolaibei.business.R;
import com.duolaibei.business.base.BaseDialog;
import com.duolaibei.business.utils.inject.Inject;

/**
 * Created by xlm on 2017/11/9 0009
 */

public class WorkerAddTypeDialog extends BaseDialog {

    @Inject(R.id.addworker_username)
    private TextView mTextViewUsername;
    @Inject(R.id.addworker_regist)
    private TextView mTextViewRegist;

    public WorkerAddTypeDialog(Context context) {
        super(context);
    }

    @Override
    protected void onSetContentView() {
        setContentView(R.layout.dialog_add_woker);
    }

    @Override
    protected void initViews() {
        initWindow(1.0f, 0, Gravity.BOTTOM);
        setAnimate(R.style.animatedialog);
    }

    @Override
    protected void onSetListener() {
        mTextViewUsername.setOnClickListener(this);
        mTextViewRegist.setOnClickListener(this);
    }

    @Override
    protected void afterOnCreate(Bundle savedInstanceState) {

    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()) {
            case R.id.addworker_username:
                listener.username();
                break;
            case R.id.addworker_regist:
                listener.regist();
                break;
        }
    }

    private Listener listener;

    public void setListener(Listener listener) {
        this.listener = listener;
    }

    public static class Listener {
        public void username() {

        }

        public void regist() {

        }
    }
}
